package com.hns.can.master.web;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hns.can.common.web.BaseController;
import com.hns.can.master.service.DeviceParamService;
import com.hns.can.master.vo.DeviceParamVo;
@Controller
@RequestMapping("deviceParam")
public class DeviceParamController extends BaseController {
	
	@Autowired
	private DeviceParamService deviceParamService;
	
	@RequestMapping("getDeviceParamSelection")
	@ResponseBody
	public Object getDeviceParamSelection(DeviceParamVo params){
		List<DeviceParamVo> list = deviceParamService.getDeviceParamSelection(params);
		return this.getReturnResult(list);
	}
	
	
	@RequestMapping("getReltivEqmtCd")
	@ResponseBody
	public Object getReltivEqmtCd(DeviceParamVo params){
		DeviceParamVo reltivEqmtCd = deviceParamService.getReltivEqmtCd(params);
		return this.getReturnResult(reltivEqmtCd);
	}
	
	
	@RequestMapping("getDevParamData")
	@ResponseBody
	public Object getDevParamData(DeviceParamVo params){
		ArrayList<DeviceParamVo> voList = deviceParamService.getDevParamData(params);
		return this.getReturnResult(voList);
	}
	
}
